class PostLogic {

    def valid(Post post) {
        println("executing valid ${post}")
        return post.name
    }

    def invalid(Post post) {
        println("executing invalid ${post}")
        return !post.name
    }

    def save(Post post) {
        println("executing save ${post}")
        return post.persistable
    }

    def save(comment) {
        println("executing save ${comment}")
    }

    def redirect(Map args) {
        def post = args.post
        def target = args.target
        println("executing redirect ${post} to ${target}")
    }

    def render(Post post) {
        println("executing render ${post}")                                                       
    }

    def foo() {
        println("executing foo")
    }
}